package org.yefei.homeworkday06;

import java.util.Scanner;

public class HomeWorkThree {

	public static void main(String[] args) {
		// 3:判断一个正数是不是回文数，回文数就是倒过来和原数相同，比如121,11,1001等
		Scanner sc = new Scanner(System.in);
		System.out.println("输入一个正数：");
		int num = sc.nextInt();
		int i = 0;
		int sum = 0;
		int newNum = num;
		while (true) {
			i = num % 10;
			sum = sum * 10 + i;
			num /= 10;
			if (num == 0) {
				break;
			}
		}
		if (sum == newNum) {
			System.out.println("是回文");
		} else {
			System.out.println("不是回文");
		}
	}

}
